package com.cordershy.pojo;

import org.apache.ibatis.type.Alias;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.math.BigDecimal;

@Component
@Alias(value = "deposit")
public class deposit implements Comparable<deposit>,Serializable {
    private int depositid;
    private String depositcount;
    private String depositnumber;
    private BigDecimal deposit;
    private String username;

    public deposit() {
    }

    public deposit(int depositid, String depositcount, String depositnumber, BigDecimal deposit, String username) {
        this.depositid = depositid;
        this.depositcount = depositcount;
        this.depositnumber = depositnumber;
        this.deposit = deposit;
        this.username = username;
    }

    public void setDepositid(int depositid) {
        this.depositid = depositid;
    }

    public void setDepositcount(String depositcount) {
        this.depositcount = depositcount;
    }

    public void setDepositnumber(String depositnumber) {
        this.depositnumber = depositnumber;
    }

    public void setDeposit(BigDecimal deposit) {
        this.deposit = deposit;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public int getDepositid() {
        return depositid;
    }

    public String getDepositcount() {
        return depositcount;
    }

    public String getDepositnumber() {
        return depositnumber;
    }

    public BigDecimal getDeposit() {
        return deposit;
    }

    public String getUsername() {
        return username;
    }

    @Override
    public String toString() {
        return "deposit{" +
                "depositid=" + depositid +
                ", depositcount='" + depositcount + '\'' +
                ", depositnumber='" + depositnumber + '\'' +
                ", deposit=" + deposit +
                ", username='" + username + '\'' +
                '}';
    }

    @Override
    public int compareTo(com.cordershy.pojo.deposit o) {
        return o.getDepositid()-this.getDepositid();
    }
}
